import React from 'react';
import { observer ,inject} from 'mobx-react';
import TemplateList from './TemplateList';
import TemplateManageStore from '../../stores/list/TemplateManageStore';

export interface TemplateManageProps {
    templateManageStore:TemplateManageStore
    location:string
}

@inject('templateManageStore')
@observer
export default class TemplateManage extends React.Component<TemplateManageProps, any> {
    componentDidMount(){
        const {templateManageStore,location}=this.props;
        templateManageStore.customid=location['query'].customid||'';
        templateManageStore.sourcetype=location['query'].sourcetype||'';
        templateManageStore.init();
    }
    render() {
        const {templateManageStore}=this.props;
        return (
            <div style={{height:'100%'}}>
               <TemplateList templateManageStore={templateManageStore}/>
            </div >
        )
    }
}

